import express from 'express';

import usersRouter  from'./users.js'

import spiderRouter  from'./spider/index.js'
import autoRouter  from './auto/index.js'
import weixinRouter  from './weixin/index.js'
import common  from './common/index.js'
import emailRouter  from './email/emailSend.js'
import navRouter  from './menu_manage/index.js'
import testRouter  from './test/test.js'
import modules  from './modules/index.js'
import dict  from './modules/dict.js'

import spider from './spider/index.js'

var router = express.Router();
var app = express()



/* GET home page. */
router.get('/env', function(req, res, next) {
    console.log('env',process.env.NODE_ENV)
  
    res.send(process.env.NODE_ENV );
});

// router.get('/sina_news', function (req, res, next) {
//   spider()
// })



router.use('/common', common);
router.use('/users', usersRouter);
router.use('/spider', spiderRouter);
router.use('/auto', autoRouter);
router.use('/weixin', weixinRouter);
router.use('/email', emailRouter);
router.use('/test', testRouter);
router.use('/sys',navRouter)
router.use('/app',modules)
router.use('/system/dict',dict)

export default router
